<?php
// no direct access
defined('_JEXEC') or die;
$db =& JFactory::getDBO();
$tmplpath	= JURI::base().'templates/'.$template;
$db->setQuery("SELECT title, introtext text FROM `#__content` where id=7");
$article=$db->loadObject();
$params=JComponentHelper::getParams('com_questions');

$basecost=$params->get("price1");
$medcost=$params->get("price2");
$hicost=$params->get("price3");
$fitcost=$params->get("price4");
$fee=$params->get("memberfee");

$dbo = JFactory::getDbo();
$query = "SELECT * FROM #__content WHERE id=18";
$dbo->setQuery($query);
$article18 = $dbo->loadObject();

$query="SELECT title, published, text FROM #__questions_core where catid=10";
$dbo->setQuery($query);
$row = $dbo->loadObjectList();
?>
<h2 class="titlepage">Pakker/Priser</h2>
<div class="eachBox creater-user-box clearfix">
	<div class="cont-box">
		<div class="wrapCreaterUser pakker-priser">
			<div class="col-info-1 start-up">
				<div class="col-box">
				<?php echo $article18->introtext;?>
				</div>
				<div class="eachForm form-select-package">
					<?php echo $article18->fulltext;?>
					<div class="cnt-package clearfix">
						<div class="wrap-m-table">
							<table class="table-step4 m-table">
								<colgroup>
								<col id="ppack1">
								<col id="ppack2">
								<col id="ppack3">
								<col id="ppack4">
								</colgroup>
								<tbody>
									<tr>
										<th>Slanke <br>
										    Pakke 1</th>
										<th>Slanke <br>
										    Pakke 2</th>
										<th>Slanke <br>
										    Pakke 3</th>
										<th>Fitness <br>
										    Pakke </th>
									</tr>
									<tr>
										<td><a><strong>Kr. <?php echo $basecost?>,-</strong> <span>Pr. måned</span></a></td>
										<td><a><strong>Kr. <?php echo $medcost?>,-</strong> <span>Pr. måned</span></a></td>
										<td><a><strong>Kr. <?php echo $hicost?>,-</strong> <span>Pr. måned</span></a></td>
										<td><a><strong>Kr. <?php echo $fitcost?>,-</strong> <span>Pr. måned</span></a></td>
									</tr>
								</tbody>
							</table>
							<!-- m-table  --> 
						</div>
						<!--wrap-m-table -->
						<div class="wrap-m-table2">
							<table class="table-step4 m-table2">
								<tbody>
									<?php for($i=0; $i<count($row); $i++){
									$query="SELECT published FROM #__questions_core WHERE catid=11 and title='".addslashes($row[$i]->title)."'";
									$dbo->setQuery($query);
									$col2=$dbo->loadObject(); 
									
									$query="SELECT published FROM #__questions_core WHERE catid=12 and title='".addslashes($row[$i]->title)."'";
									$dbo->setQuery($query);
									$col3=$dbo->loadObject(); 
									
									$query="SELECT published FROM #__questions_core WHERE catid=16 and title='".addslashes($row[$i]->title)."'";
									$dbo->setQuery($query);
									$col4=$dbo->loadObject();
									
								    if($row[$i]->published){
										$col1_img = '<img src="templates/fitplan/src_mobile/images/checkRed.png" alt="">';
									} else {
										$col1_img = '';
									}
									
								    if($col2->published){
										$col2_img = '<img src="templates/fitplan/src_mobile/images/checkRed.png" alt="">';
									} else {
										$col2_img = '';
									}
									
								    if($col3->published){
										$col3_img = '<img src="templates/fitplan/src_mobile/images/checkRed.png" alt="">';
									} else {
										$col3_img = '';
									}
									
								    if($col4->published){
										$col4_img = '<img src="templates/fitplan/src_mobile/images/checkRed.png" alt="">';
									} else {
										$col4_img = '';
									}
									?>
									<tr class="odd">
										<td class="t-col-all" colspan="4"><div>
												<div class="tool-tip tooltip" title="<?php echo htmlspecialchars(nl2br($row[$i]->text));?>"><img src="templates/fitplan/src_mobile/images/iconTooltip.png" alt=""></div>
												<span class="namePack"><?php echo $row[$i]->title;?></span></div></td>
									</tr>
									<tr class="even">
										<td class="t-col-1"><?php echo $col1_img;?></td>
										<td class="t-col-2"><?php echo $col2_img;?></td>
										<td class="t-col-3"><?php echo $col3_img;?></td>
										<td class="t-col-4"><?php echo $col4_img;?></td>
									</tr>
									<?php }?>
								</tbody>
							</table>
							<!-- m-table2  --> 
						</div>
						<!--wrap-m-table2-->
						<div class="wrap-m-table3">
							<table class="table-step4 m-table3">
								<tbody>
									<tr class="none">
										<td class="t-col-1"><h6>Vælg tilkøb (valgfrit)</h6></td>
										<td class="t-col-2">Pris</td>
									</tr>
									<?php 
									$query="SELECT title, text, parent FROM #__questions_core WHERE catid=15";
									$dbo->setQuery($query);
									$rows = $dbo->loadObjectList();
									$i = 1;
								    foreach($rows as $row){
									?>
									<tr class="<?php if($i%2) echo 'odd'; else echo 'even'?>">
										<td class="t-col-1"><div>
												<div class="tool-tip tooltip" title="<?php echo str_replace(array("<",">"), array("&lt;", "&gt;"), nl2br($row->text));?>"><img src="templates/fitplan/src_mobile/images/iconTooltip.png" alt=""></div>
												<span class="namePack"><?php echo $row->title;?></span></div></td>
										<td class="t-col-2"> Kr. <?php echo $row->parent;?>,- </td>
									</tr>
									<?php $i++;}?>
								</tbody>
							</table>
							<!--m-table3--> 
						</div>
						<!--wrap-m-table3--> 
					</div>
					<!--package--> 
				</div>
				<!--form-select-package--> 
			</div>
			<!--col-info-1-->
			<div class="col-info-2">
				<div class="eachForm">
					<div class="wrap-btn-cru clearfix"> <a class="btnYellow left" href="index.php?option=com_users&view=registration&Itemid=105">Opret Bruger nu</a> <a class="btnGreen right" href="det-faar-du">HVAD FÅR DU?</a> </div>
					<!--wrap-btn-cru--> 
				</div>
				<!--.eachForm-->
				<div class="eachForm">
					<h5 class="tit"><span class="icontit"><img src="templates/fitplan/src_mobile/images/iconMembership.png"></span><span class="nametit">Medlemskab</span></h5>
					<?php echo $article->text?>
				</div>
				<!--.eachForm-->
				<?php
				$db->setQuery("SELECT title, introtext text FROM `#__content` where id=9");
				$article=$db->loadObject();
				?>
				<div class="eachForm form-how">
					<h5 class="tit"><span class="icontit"><img src="templates/fitplan/src_mobile/images/iconHow.png"></span><span class="nametit">Hvordan virker det?</span></h5>
					<?php echo $article->text?>
				</div>
				<!--.form-how-->
				<?php
				$db->setQuery("SELECT title, introtext text FROM `#__content` where id=8");
				$article=$db->loadObject();
				?>
				<div class="eachForm form-mail">
					<h5 class="tit"><span class="icontit"><img src="templates/fitplan/src_mobile/images/iconMail.png"></span><span class="nametit">Kundeservice</span></h5>
					<?php echo $article->text?>
				</div>
				<!--.form-mail--> 
			</div>
			<!--col-info-2--> 
		</div>
		<!--wrapCreaterUser--> 
	</div>
	<!-- cont-boX--> 
</div>
<script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = 982967144;
var google_custom_params = window.google_tag_params;
var google_remarketing_only = true;
/* ]]> */
</script> 
<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js">
</script>
<noscript>
<div style="display:inline;"> <img height="1" width="1" style="border-style:none;" alt="" src="//googleads.g.doubleclick.net/pagead/viewthroughconversion/982967144/?value=0&amp;guid=ON&amp;script=0"/> </div>
</noscript>